package com.credithc.signature.facade.client;

import com.credithc.baseserv.core.message.Message;
import com.credithc.signature.common.ro.GetExtSignPageRo;
import com.credithc.signature.common.ro.core.CoreRequet;
import com.credithc.signature.common.ro.facade.FddAuthReq;
import com.credithc.signature.common.ro.facade.FddSignReq;
import com.credithc.signature.common.ro.facade.QueryAuthenticationStatusReq;
import com.credithc.signature.common.ro.sign.GetExtBatchSignPageRo;
import com.credithc.signature.common.to.CallBackCompany;
import com.credithc.signature.common.to.CallBackPerson;
import com.credithc.signature.facade.ro.RestSignatureReq;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import javax.validation.Valid;

/**
 * @desc: <br/>
 * @author: Jingbo Hu<br/>
 * @time：2020年07⽉13⽇<br/>
 * @version：v1.0.0<br>
 */
@FeignClient(name = "signature-core")
public interface FadadaRemoteClient {

    @PostMapping("/api/core/v1/register")
    Message register(FddAuthReq req);

    @PostMapping("/api/core/v1/signUrl")
    Message getSignUrl(GetExtSignPageRo req);

    @PostMapping("/api/core/v1/batch/signUrl")
    Message getBatchSignUrl(GetExtBatchSignPageRo req);

    @PostMapping("/api/core/v1/getAuthUrl")
    Message getAuthUrl(FddAuthReq req);

    @PostMapping("/api/core/v1/queryStatus")
    Message queryStatus(QueryAuthenticationStatusReq req);

    @PostMapping("/api/core/v1/applyCert")
    Message applyCert(FddAuthReq req);

    @PostMapping("/api/core/v1/download")
    Message download(FddAuthReq req);

    @PostMapping("/api/core/v1/uploadContract")
    Message uploadContract(FddAuthReq req);

    @PostMapping("/api/core/v1/downloadContract")
    Message downloadContract(FddAuthReq req);

    @PostMapping("/api/core/v1/modifyUserInfo")
    Message modifyUserInfo(FddAuthReq req);

    @PostMapping("/api/core/v1/completePersonInfo")
    void completePersonInfo(@RequestBody CallBackPerson callBackPerson, @RequestParam("status") String status, @RequestParam("statusDesc") String statusDesc);

    @PostMapping("/api/core/v1/completeCompanyInfo")
    void completeCompanyInfo(@RequestBody CallBackCompany callBackCompany, @RequestParam("status") String status, @RequestParam("statusDesc") String statusDesc);

    @PostMapping("/api/core/v1/contractOver")
    Message contractOver(FddAuthReq req);

    @PostMapping("/api/core/v1/queryUserInfo")
    Message queryUserInfo(FddAuthReq req);

    @PostMapping("/api/core/v1/completeSealInfo")
    String completeSealInfo(CallBackCompany callBackCompany);

    @PostMapping("/api/core/v1/querySignatureInfo")
    Message querySignatureInfo(FddAuthReq req);

    @PostMapping("/api/core/v1/querySealInfo")
    Message querySealInfo(FddAuthReq req);

    @PostMapping("/api/core/v1/contractRenewal")
    Message contractRenewal(@Valid FddSignReq req);

    @PostMapping("/api/core/v1/contract/status")
    Message getContractStatus(@Valid FddSignReq req);

    @PostMapping("/api/core/v1/sign/synchronous")
    Message synchronouSign(CoreRequet coreRequet);
}
